<input type="hidden" name="id" value="{{ $store->id ?? '' }}" />
<input type="hidden" name="admin_id" value="{{ $store->admin_id ?? '' }}" />
@csrf
<div class="layui-form-item">
    <label for="" class="layui-form-label">商家名称</label>
    <div class="layui-input-block">
        <input type="text" name="title" value="{{$store->title??''}}" lay-verify="required" placeholder="" class="layui-input" >
    </div>
</div>

<div class="layui-form-item">
    <label for="" class="layui-form-label">联系人</label>
    <div class="layui-input-block">
        <input type="text" name="nickname" lay-verify="required" value="{{$store->admin->nickname ?? ''}}" placeholder="" class="layui-input" >
    </div>
</div>

<div class="layui-form-item">
    <label for="" class="layui-form-label">联系人电话</label>
    <div class="layui-input-block">
        <input type="text" name="phone" lay-verify="required|phone" value="{{$store->admin->phone ?? ''}}" placeholder="" class="layui-input" >
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">客服电话</label>
    <div class="layui-input-block">
        <input type="text" name="service_mobile" lay-verify="required|phone" value="{{$store->service_mobile ?? ''}}" placeholder="" class="layui-input" >
    </div>
</div>
{{--<div class="layui-form-item">
    <label class="layui-form-label">营业时间段</label>
    <div class="layui-input-inline">
        <input type="text" class="layui-input" lay-verify="required" name="open_start" id="open_start" placeholder="开始时间" value="{{ $store->open_start ?? ''}}">
    </div>
    <div class="layui-form-mid"> 至 </div>
    <div class="layui-input-inline">
        <input type="text" class="layui-input" lay-verify="required" name="open_end" id="open_end" placeholder="结束时间" value="{{ $store->open_end ?? ''}}">
    </div>
    <div class="layui-form-mid layui-word-aux">仅限到店核销类型商家</div>
</div>--}}
<div class="layui-form-item">
    <label class="layui-form-label">位置</label>
    <div class="layui-input-inline">
        <select name="province" id="province" lay-verify="required" class="layui-form" lay-filter="province" lay-search>
            <option value=""></option>
            @foreach($provinces as $province)
                <option value="{{ $province->name }}" @if(isset($store) && $province->name == $store->province) selected @endif>{{ $province->name }}</option>
            @endforeach
        </select>
    </div>
    <div class="layui-input-inline">
        <select name="city" id="city" lay-verify="required" class="layui-form" lay-filter="city" lay-search>
            <option value=""></option>
            @isset($store)
            <option value="{{ $store->city }}" selected>{{ $store->city }}</option>
            @endisset
        </select>
    </div>
    <div class="layui-input-inline">
        <select name="district" id="district" lay-verify="required" class="layui-form" lay-filter="district" lay-search>
            <option value=""></option>
            @isset($store)
            <option value="{{ $store->district }}" selected>{{ $store->district }}</option>
            @endisset
        </select>
    </div>
</div>
<div class="layui-form-item">
    <label for="" class="layui-form-label">详细地址</label>
    <div class="layui-input-inline">
        <input type="text" name="detailed_address" lay-verify="required" value="{{$store->detailed_address ?? ''}}" placeholder="" class="layui-input" >
    </div>
    <div class="layui-form-mid layui-word-aux">街道门牌号</div>
</div>
<div class="layui-form-item">
    <div class="layui-input-block">
        <button type="submit" class="layui-btn" lay-submit="" lay-filter="productC">确 认</button>
        <a class="layui-btn" href="{{ $_GET['backUrl'] ?? route('store')}}" >返 回</a>
    </div>
</div>

